<?php 
namespace app\admin\model;
use think\Model;

class Ad extends Model
{
	public function show()
	{
		return $this->order('orderby','desc');
	}
	public function cou()
	{
		return $this->select()->count();
	}
	public function adda($arr)
	{
		return $this->insert($arr);
	}
	public function delad($id)
	{
		return $this->where('id','in',$id)->delete();
	}	
	public function sela()
	{
		return $this->select();
	}
	public function selo($id)
	{
		return $this->where('id',$id)->select();
	}
	public function updzd($id,$arr)
	{
		return $this->where('id',$id)->update($arr);
	}
}